program q1102;
var
    i, a, ans:integer;
    arr:array[1..10] of integer;
begin
    assign(input, '');
    assign(output, '');
    reset(input);
    rewrite(output);

    for i:=1 to 10 do
        read(arr[i]);
    readln(a);

    a := a + 30;
    ans := 0;
    for i:=1 to 10 do
        if (a >= arr[i]) then inc(ans);

    writeln(ans);

    close(input);
    close(output);
end.
